import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] arr = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
        char[] tmp = s.toCharArray();
        System.out.println('Z'-'A');
        for (int i = 0; i < tmp.length; i++) {
            if (tmp[i] >= 'A' && tmp[i] <= 'Z') {
                int j =tmp[i] - 'A' - 5;
                if (j < 0) {
                    j = 'Z' - 'A' + 1 + j;
                }
                tmp[i] = arr[j];
            }
        }
        System.out.println(tmp);
    }
}